---
title: Fieldset
description: The Fieldset component can be used to create an unstyled fieldset element.
docType: Demo
docGroup: Components
group: Form
components: [Fieldset, Legend]
---

# Fieldset

The `Fieldset` component can be used to create an unstyled
[fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset)
to group several controls within a web form.

## Simple Example

The `Fieldset` should be used with the [Legend](/components/legend) component.

```demo source="./SimpleExample.tsx"

```

## Full Width

The `Fieldset` can span the entire width by enabling the `fullWidth` prop.

```demo source="./FullWidthExample.tsx"

```

## Floating Legend

Set the `floatingLegend` prop to `true` to allow the `Legend` to float like a
`Label`.

> !Info! See the [Legend](/components/legend) demos for more info around this
> behavior and additional styling available.

```demo source="./FloatingLegendExample.tsx"

```
